package com.letoken.platform.app.configuration;

import com.letoken.platform.app.interceptor.AppUserTokenInterceptor;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @version 1.0
 * @author： letokenlabs
 * @date： 2022-11-11 18:34
 */
@Configuration
@AllArgsConstructor
public class AuthInterceptorConfiguration implements WebMvcConfigurer {

    @Autowired
    private AppUserTokenInterceptor appUserTokenInterceptor;


    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(appUserTokenInterceptor);
    }
}
